Skip to content

Update .gitignore files in the sample projects#8143

Merged
ChristopherDedominici merged 3 commits intomainfrom
extend-templates-gitignore
Apr 16, 2026
Merged

Update .gitignore files in the sample projects#8143
ChristopherDedominici merged 3 commits intomainfrom
extend-templates-gitignore

Conversation

@ChristopherDedominici
Copy link
Copy Markdown
Contributor

Fixes: #8126

@ChristopherDedominici ChristopherDedominici self-assigned this Apr 14, 2026
Copilot AI review requested due to automatic review settings April 14, 2026 13:58
@github-project-automation github-project-automation Bot moved this to Backlog in Hardhat Apr 14, 2026
@ChristopherDedominici ChristopherDedominici added no docs needed This PR doesn't require links to documentation no peer bump needed labels Apr 14, 2026
@ChristopherDedominici ChristopherDedominici moved this from Backlog to In Progress in Hardhat Apr 14, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 14, 2026

🦋 Changeset detected

Latest commit: 32884c6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
hardhat Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates Hardhat 3 sample project template ignore rules so generated projects don’t accidentally commit sensitive env files or artifacts produced by builtin coverage/snapshot tooling (Fixes #8126).

Changes:

  • Ignore .env and .env.* files while allowing .env.example.
  • Ignore gas snapshot output (.gas-snapshot) and snapshot-cheatcodes output (/snapshots).
  • Keep existing coverage output ignore (/coverage) while adding the missing snapshot-related ignores.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/hardhat/templates/hardhat-3/03-minimal/gitignore Adds env + gas snapshot + snapshot-cheatcodes ignores to the minimal Hardhat 3 template.
packages/hardhat/templates/hardhat-3/02-mocha-ethers/gitignore Adds env + gas snapshot + snapshot-cheatcodes ignores to the mocha+ethers Hardhat 3 template.
packages/hardhat/templates/hardhat-3/01-node-test-runner-viem/gitignore Adds env + gas snapshot + snapshot-cheatcodes ignores to the node test runner+viem Hardhat 3 template.

Comment thread .changeset/moody-monkeys-jump.md Outdated
Copy link
Copy Markdown
Member

@alcuadrado alcuadrado left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me, can you double-check it, @schaable

@schaable schaable self-requested a review April 14, 2026 15:26
Co-authored-by: Patricio Palladino <email@patriciopalladino.com>
Copilot AI review requested due to automatic review settings April 14, 2026 16:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread packages/hardhat/templates/hardhat-3/02-mocha-ethers/gitignore
Comment thread packages/hardhat/templates/hardhat-3/03-minimal/gitignore
Comment thread .changeset/moody-monkeys-jump.md
@ChristopherDedominici ChristopherDedominici added this pull request to the merge queue Apr 16, 2026
Merged via the queue into main with commit d93a8f8 Apr 16, 2026
226 checks passed
@ChristopherDedominici ChristopherDedominici deleted the extend-templates-gitignore branch April 16, 2026 14:33
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Hardhat Apr 16, 2026
@github-actions github-actions Bot mentioned this pull request Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no docs needed This PR doesn't require links to documentation no peer bump needed

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update .gitignore files in the sample projects

5 participants